class PhotoEntity{
  final int? total;
  List<Upload>? rows;

  PhotoEntity({this.rows, this.total});

  factory PhotoEntity.fromJson(Map<String, dynamic> json) {
    final originList = json['rows'] as List?;
    List<Upload> protocolList =
        (originList??[]).map((value) => Upload.fromJson(value)).toList();
    return PhotoEntity(rows: protocolList, total: json['total']);
  }
}

class Upload {
  String? path;
  String? fileName;
  String? name;
  int? id;
  int? fileId;
  bool? isSelected;

  String? fileType;
  String? fileDesc;
  String? filePath;
  //团体客户
  String? orgName;
  String? contactName;
  String? contactMobile;
  String? visitTime;
  int? orgId;

  Upload(
      {this.path,
      this.id,
      this.fileDesc,
      this.fileName,
      this.fileId,
      this.name,
      this.isSelected,
      this.fileType,
      this.filePath,

      this.orgName,
      this.contactName,
      this.contactMobile,
      this.visitTime,
      this.orgId,
      });

  Upload.fromJson(Map data) {
    orgId = data['orgId'];
    visitTime = data['visitTime'];
    contactMobile = data['contactMobile'];
    contactName = data['contactName'];
    orgName = data['orgName'];
    path = data['path'];
    id = data['id'] ;
    fileName = data['fileName'];
    fileId = data['fileId'];
    name = data['name'];
    fileType = data['fileType'];
    fileDesc = data['fileDesc'];
    filePath = data['filePath'];
    isSelected = data['isSelected'] = false;
  }

  Map<String, dynamic> toJson() {
    return {
      'path': this.path,
      'fileName': this.fileName,
      'name': this.name,
      'id': this.id,
      'fileId': this.fileId,
      'isSelected': this.isSelected,
      'fileType': this.fileType,
      'fileDesc': this.fileDesc,
      'filePath': this.filePath,
      'orgName': this.orgName,
      'contactName': this.contactName,
      'contactMobile': this.contactMobile,
      'visitTime': this.visitTime,
      'orgId': this.orgId,
    };
  }
}